Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to real pypi #1074

Merged
merged 3 commits into from
May 16, 2022
Merged

switch to real pypi #1074

merged 3 commits into from
May 16, 2022

Conversation

joamatab
Copy link
Contributor

@joamatab joamatab commented May 6, 2022

No description provided.

Copy link
Collaborator

@thomaslima thomaslima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @joamatab Please also uncomment line 82 so we don't upload wheels for every commit. Also change the base to branch 0.27. @klayoutmatthias uses the master for future releases.

@joamatab
Copy link
Contributor Author

joamatab commented May 6, 2022

perfect,

Done!

thank you Thomas,

@thomaslima
Copy link
Collaborator

@joamatab can you change the target branch from master to 0.27?

@joamatab
Copy link
Contributor Author

joamatab commented May 6, 2022

yes,

see this PR
#1077

@klayoutmatthias
Copy link
Collaborator

klayoutmatthias commented May 6, 2022

Thanks for this PR.

You don't need to change the target branch. I'll keep that master and 0.27 synchronized myself when merging.

I just like to suggest one enhancement: it's Ok to use real PyPI for releases, but I actually liked having an option to deploy to test PyPI for example for providing preview releases. So my suggestion was to scan for special tags like "v*-preview" and trigger a PyPI-test deployment for those.

What do you think?

Matthias

P.S: I hate that PyPI even in the test instance does not allow deleting releases :(

@joamatab
Copy link
Contributor Author

joamatab commented May 6, 2022

it's quite easy to delete PyPi releases, or i usually just make a new one

image

@thomaslima
Copy link
Collaborator

@joamatab can you take a stab at duplicating the upload step (one for test and one for real) based on tag name? I'm on mobile for the next 4 days.

You can delete a pypi wheel but can't reupload with the same version. So only the first pypi upload works.

@klayoutmatthias the only silver lining is that the upload step only runs if tests are successful.

@klayoutmatthias
Copy link
Collaborator

klayoutmatthias commented May 8, 2022

That's perfect - I don't want to upload anything for which the tests are failing :)

@joamatab Yes, you can delete a release but never use the same one again. Previously I ended up with fake ones just because I made some mistake.

BTW: I got a message by @Kazzz-S who is doing the Mac releases. He is no longer able to push to his own fork:

~/GitWork/klayout> git push --porcelain --progress origin refs/heads/0.27:refs/heads/0.27
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
failed to push some refs to 'https://github.com/Kazzz-S/klayout.git'
To https://github.com/Kazzz-S/klayout.git
! refs/heads/0.27:refs/heads/0.27 [remote rejected] \
   (refusing to allow an OAuth App to create or update workflow `.github/workflows/build.yml` without `workflow` scope)
Done
'0.27' rejected (non-fast-forward)

Edit: I understand he needs to generate a new token and make sure workflow scope is enabled, right?

Matthias

@joamatab
Copy link
Contributor Author

joamatab commented May 8, 2022

okay,

now it always uploads to test_pypi and also uploads to pypi for new releases

let me know what you think
Joaquin

@Kazzz-S
Copy link
Contributor

Kazzz-S commented May 10, 2022

That's perfect - I don't want to upload anything for which the tests are failing :)

@joamatab Yes, you can delete a release but never use the same one again. Previously I ended up with fake ones just because I made some mistake.

BTW: I got a message by @Kazzz-S who is doing the Mac releases. He is no longer able to push to his own fork:

~/GitWork/klayout> git push --porcelain --progress origin refs/heads/0.27:refs/heads/0.27
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
failed to push some refs to 'https://github.com/Kazzz-S/klayout.git'
To https://github.com/Kazzz-S/klayout.git
! refs/heads/0.27:refs/heads/0.27 [remote rejected] \
   (refusing to allow an OAuth App to create or update workflow `.github/workflows/build.yml` without `workflow` scope)
Done
'0.27' rejected (non-fast-forward)

Edit: I understand he needs to generate a new token and make sure workflow scope is enabled, right?

Matthias

Yes, you are right. I've regenerated a new token enabling the workflow scope and set it in my git client tool (SmartGit).
GithubToken


In my case, however, I needed to follow the instructions below.

SmartGit2
https://docs.syntevo.com/SmartGit/Latest/GitHub-integration.html#re-setup-oauth

Now, I can push branches to my fork.

I appreciate your help.
Kazzz-S

@klayoutmatthias klayoutmatthias merged commit be98a0a into KLayout:master May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants